package com.jq.invoicing.syn.action.gift;

import java.util.List;

import com.jq.invoicing.syn.service.GiftService;
import com.jq.invoicing.syn.vo.Gift;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class ListGiftAction extends ActionSupport implements ModelDriven<Gift>{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6871010963547915175L;
	
	private GiftService giftService;
	private Gift gift = new Gift();
	private List<Gift> giftList;
	
	public String execute(){
		try {
			giftList = giftService.getGifts();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return SUCCESS;
	}

	public GiftService getGiftService() {
		return giftService;
	}

	public void setGiftService(GiftService giftService) {
		this.giftService = giftService;
	}

	public Gift getModel() {
		// TODO Auto-generated method stub
		return gift;
	}

	public List<Gift> getGiftList() {
		return giftList;
	}

	public void setGiftList(List<Gift> giftList) {
		this.giftList = giftList;
	}
}
